//
//  WXTableViewCell.m
//  CoreDataAddressBook
//
//  Created by dllo on 15/11/20.
//  Copyright (c) 2015年 lanou3g. All rights reserved.
//

#import "WXTableViewCell.h"

@implementation WXTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createView];
    }
    return self;
}
- (void)createView{
    self.nameLabel = [[UILabel alloc] init];
    [self.contentView addSubview:self.nameLabel];
    self.nameLabel.backgroundColor = [UIColor yellowColor];
    [_nameLabel release];
    
    self.sexLabel = [[UILabel alloc] init];
    [self.contentView addSubview:self.sexLabel];
    self.sexLabel.backgroundColor = [UIColor blueColor];
    self.sexLabel.textAlignment = 1;
    [_sexLabel release];
    
    self.telephotoLabel = [[UILabel alloc] init];
    [self.contentView addSubview:self.telephotoLabel];
    self.telephotoLabel.backgroundColor = [UIColor orangeColor];
    self.telephotoLabel.textAlignment = 2;
    [_telephotoLabel release];
}

- (void)layoutSubviews{
    [super layoutSubviews];
    self.nameLabel.frame = CGRectMake(3, 5, 90, 50);
    self.sexLabel.frame = CGRectMake(95, 5, 40, 50);
    self.telephotoLabel.frame = CGRectMake(137, 5, 230, 50);
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
